/**
 * 
 */
package com.deep.test.util;

/**
 * @author HDP23
 *
 */
public class ArraysUtil {
	 public static void printArray(int[] array) {  
         System.out.print("{");  
         for (int i = 0; i < array.length; i++) {  
             System.out.print(array[i]);  
             if (i < array.length - 1) {  
                 System.out.print(", ");  
             }  
         }  
         System.out.println("}");  
     }  

     public static void exchangeElements(int[] array, int index1, int index2) {  
         int temp = array[index1];  
         array[index1] = array[index2];  
         array[index2] = temp;  
     }  
}
